<?php

namespace App\Http\Controllers\Api\V1;

use App\Http\Controllers\ApiController;
use App\Services\Album\AlbumService;

/**
 * Class AlbumController
 * @package App\Http\Controllers\Api\V1
 */
class AlbumController extends ApiController
{

    /**
     * @var AlbumService
     */
    protected $albumService;

    /**
     * AlbumController constructor.
     * @param AlbumService $albumService
     */
    public function __construct(AlbumService $albumService)
    {
        $this->albumService = $albumService;
    }

    /**
     * 获取一个指定的专辑
     * @author Jerry
     * @param int $id
     * @param int $isShow
     * @return mixed
     */
    public function index(int $id, int $isShow = 0)
    {
        $data = $this->albumService->handle($id, $isShow);

        return $this->status('success', $data);
    }
}
